<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
	<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> 
	<META HTTP-EQUIV="Expires" CONTENT="0"> 
	<title>缴存打印证明</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="../../css/font_eolqem241z66flxr.css" media="all" />
	<link rel="stylesheet" href="../../css/news.css" media="all" />
	<script src="../../layui/js/angular.js"></script>
	<script type="text/javascript" src="../../layui/layui/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="../../layui/layui/GetPath.js"></script>
	<script src="../../layui/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../layui/js/fy.js"></script>
	<script type="text/javascript" src="../../layui/layui/layer.ext.js"></script>
	<script type="text/javascript" src="../../layui/lay/modules/layer.js"></script>
	<script type="text/javascript" src="../../layui/js/jegs.js"></script>
	  <link rel="stylesheet" href="../../pdf/css/style.css">
	<script type="text/javascript" src="../../layui/js/jegs.js"></script>
	<style>
	    .tablebox{border:0;}
	    .tablebox td{border:0;}
	</style>
	<!-- JQuery 的遮罩层 -->
	<style type="text/css">     
    .mask {       
            position: absolute; top: 0px; filter: alpha(opacity=60); 
            z-index: 1002; left: 0px;              
			background:url(../../layui/layui/img/jz.gif) no-repeat center rgba(0,0,0,0.5) ;
		  	background-size:30px 30px;
			background-repeat: no-repeat;
			background: 
        }     
	</style>
	<style>
	    .tablebox{border:0;}
	    .tablebox td{border:0;}
	    .yangshi{font-weight:bold}
	     table {
            width: 100%;
            font-size: .938em;
            border-collapse: collapse;/*边框会合并为一个单一的边框*/
        }
		.main td{ height:70px; border:#000000 2px solid;}
		.main th{ height:70px; border:#000000 2px solid;}
	</style>
	 <style> tr,td{font-size:30px;<br/>color:#000000;<br/>background:#ffffff;<br/>} </style>
	</head>
<body class="childrenBody">
	<div align="center" id="mask" class="mask"></div>   
		<div class="tools">
            <button id="exportToPdf">确定打印</button>
        </div>
			<div id="export_content" style="height: 100%;width: 100%">
			<br><br><br><br>
           		<div align="center">
	 				<font class="yangshi" size="7">住房公积金缴存情况证明</font>
	 			</div>
	 			<br><br><br><br>
	 			<div ng-app="myApp" ng-controller="customersCtrl" align="center">
				<table border="3" class="main">
				<tbody>
					<tr>
						<th width="20%">职工姓名</th>
						<td style="text-align:left;padding-left:30px;width:25%"><b id="XINGMING"></b></td>
						<th width="20%">身份证号码</th>
						<td style="text-align:left;padding-left:20px;width:25%"><b id="ZJHM"></b>
						</td>
					</tr>
					<tr>
						<th>工作单位</th>
						<td colspan="3" style="text-align:left;padding-left:20px;"><b id="DWMC"></b>
						</td>
					</tr>
					<tr>
						<th>单位代码</th>
						<td style="text-align:left;padding-left:20px;"><b id="DWZH"></b>
						</td>
						<th>个人账号</th>
						<td style="text-align:left;padding-left:20px;"><b id="GRZH"></b>
						</td>
					</tr>	
					<tr>
						<th>单位缴存比例</th>
						<td style="text-align:left;padding-left:20px;"><b id="DWJCBL"></b></td>
						<th>个人缴存比例</th>
						<td style="text-align:left;padding-left:20px;"><b id="GRJCBL"></b>
						</td>
					</tr>
					<tr>
						<th>缴存基数</th>
						<td style="text-align:left;padding-left:20px;"><b id="GRJCJS"></b></td>
						<th>月缴存额</th>
						<td style="text-align:left;padding-left:20px;"><b id="GRYJCE"></b></td>
					</tr>	
					<tr>
						
						<th>账户余额</th>
						<td style="text-align:left;padding-left:20px;"><b id="GRZHYE"></b></td>
						<th>缴存状态</th>
						<td style="text-align:left;padding-left:20px;"><b id="JCZT"></b></td>
					</tr>	
					<tr>
						<th>开户日期</th>
						<td style="text-align:left;padding-left:20px;"><b id="KHRQ"></b></td>
						<th>缴至年月</th>
						<td style="text-align:left;padding-left:20px;"><b id="JZNY"></b></td>
					</tr>	
					<tr>
						<th>销户提取时间</th>
						<td style="text-align:left;padding-left:20px;"><b id="XHRQ"></b></td>
						<th>销户提取金额</th>
						<td style="text-align:left;padding-left:20px;"><b id="XHTQJE"></b></td>
					</tr>	
					<tr>
						<th colspan="5" align="center">最近一年内个人公积金缴存明细:</th>
					</tr>						
				<tr>
					<th>单位代码</th>
					<th>缴存年月</th>
					<th>姓名</th>
					<th>缴存金额</th>
				</tr> 
				<tr ng-repeat="x in names" align="center" id="tr1">
					<th style="text-align:left;padding-left:20px;">{{ x.DWZH }}</th>
					<th style="text-align:left;padding-left:20px;">{{ x.JJNY }}</th>
					<th style="text-align:left;padding-left:20px;">{{ x.XINGMING }}</th>
					<th style="text-align:left;padding-left:20px;">{{ x.JCJE }}</th>
				 </tr>
				 <tr ng-hide="tr1">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr2">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr3">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr4">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr5">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr6">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr7">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr8">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr9">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr10">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr11">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
				 <tr ng-hide="tr12">
				 	<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
					<th style="text-align:left;padding-left:20px;">&nbsp;</th>
				 </tr>
			 </tbody>
		</table>
		</div>
		<div align="left" style="position:absolute; margin:0;"><img style="width: 45%;" src="../../images/gjj.png" /></div>
		<div align="center"><font size="6">以上证明真实、合法、有效，所示数据以开具日期为准，本证明权作职工住房公积金缴存证明使用。</font>
		</div>
		<br><br>
		<div align="left"><font size="6">证明单位:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;延边朝鲜族自治州住房公积金管理中心</font>
		</div>
		<br><br>
		<div align="left"><font size="6">经办人:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;自助柜员</font></div>
		<br><br><br><br><br><br><br><br><br><br>
		<div align="right"><font size="6"><b align="right" id="dyrq"></b></font></div></div>
				<br><br>
				
	<script src="../../pdf/js/jspdf.debug.js"></script>
        <script src="../../pdf/js/html2canvas.js"></script>
        <script src="../../pdf/main.js"></script>
        <script type="text/javascript">
        	var downPdf = document.getElementById("exportToPdf");
			    downPdf.onclick = function () {
			        html2canvas(
			                document.getElementById("export_content"),
                {
                    dpi: 172,//导出pdf清晰度
                    onrendered: function (canvas) {
                        var contentWidth = canvas.width;
                        var contentHeight = canvas.height;

                        //一页pdf显示html页面生成的canvas高度;
                        var pageHeight = contentWidth / 492.28 * 741.89;
                        //未生成pdf的html页面高度
                        var leftHeight = contentHeight;
                        //pdf页面偏移
                        var position = 2;
                        //html页面生成的canvas在pdf中图片的宽高（a4纸的尺寸[595.28,841.89]）
                         var imgWidth = 560;
                        var imgHeight = 570 / contentWidth * contentHeight;
                        var pageData = canvas.toDataURL('image/jpeg', 1.0);
                        var pdf = new jsPDF('', 'pt', 'a4');

                        //有两个高度需要区分，一个是html页面的实际高度，和生成pdf的页面高度(841.89)
                        //当内容未超过pdf一页显示的范围，无需分页
                        if (leftHeight < pageHeight) {
                            pdf.addImage(pageData, 'JPEG', 10, 0, imgWidth, imgHeight);
                        } else {
                            while (leftHeight > 0) {
                                pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
                                leftHeight -= pageHeight;
                                position -= 841.89;
                                //避免添加空白页
                                if (leftHeight > 0) {
                                    pdf.addPage();
                                }
                            }
                        }
                        pdf.save('住房公积金缴存情况证明.pdf');
                    },
                    //背景设为白色（默认为黑色）
                    background: "#fff"  
                });
  }
        	
        </script>
		<script type="text/javascript" src="../../js/log.js"></script>
	<script type="text/javascript" src="../../layui/layui/layui.js"></script>
	<script>
		layui.use('layer', function(){
  			var layer = layui.layer;
		});              
	</script>
	<script> 
        	function getPath(){
		   return 'http://'+location.host;	
	      };
		var a;
			var app = angular.module('myApp', []);
		    app.controller('customersCtrl', function($scope, $http) {
		    var date=new Date();
			var year=date.getFullYear(); //获取当前年份
			var mon=date.getMonth()+1; //获取当前月份
    		var sj=year+""+mon;
		   $scope.params={sj:sj},
		    s();
			$http({
				url:getPath() + "/wsyyt/jclsjlcontroller/dy",
				method:'post',
				params:$scope.params
			}).then(
					function(res) {
								$scope.data = res.data.data.RETDATA;//自己打断点看格式:[{},{}]
								 if(res.data.data.RETDATA.length==0){
									$scope.tr1 = false;
									$scope.tr2 = false;
									$scope.tr3 = false;
									$scope.tr4 = false;
									$scope.tr5 = false;
									$scope.tr6 = false;
									$scope.tr7 = false;
									$scope.tr8 = false;
									$scope.tr9 = false;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==1){
									$scope.tr1 = true;
									$scope.tr2 = false;
									$scope.tr3 = false;
									$scope.tr4 = false;
									$scope.tr5 = false;
									$scope.tr6 = false;
									$scope.tr7 = false;
									$scope.tr8 = false;
									$scope.tr9 = false;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==2){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = false;
									$scope.tr4 = false;
									$scope.tr5 = false;
									$scope.tr6 = false;
									$scope.tr7 = false;
									$scope.tr8 = false;
									$scope.tr9 = false;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==3){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = true;
									$scope.tr4 = false;
									$scope.tr5 = false;
									$scope.tr6 = false;
									$scope.tr7 = false;
									$scope.tr8 = false;
									$scope.tr9 = false;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==4){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = true;
									$scope.tr4 = true;
									$scope.tr5 = false;
									$scope.tr6 = false;
									$scope.tr7 = false;
									$scope.tr8 = false;
									$scope.tr9 = false;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==5){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = true;
									$scope.tr4 = true;
									$scope.tr5 = true;
									$scope.tr6 = false;
									$scope.tr7 = false;
									$scope.tr8 = false;
									$scope.tr9 = false;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==6){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = true;
									$scope.tr4 = true;
									$scope.tr5 = true;
									$scope.tr6 = true;
									$scope.tr7 = false;
									$scope.tr8 = false;
									$scope.tr9 = false;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==7){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = true;
									$scope.tr4 = true;
									$scope.tr5 = true;
									$scope.tr6 = true;
									$scope.tr7 = true;
									$scope.tr8 = false;
									$scope.tr9 = false;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==8){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = true;
									$scope.tr4 = true;
									$scope.tr5 = true;
									$scope.tr6 = true;
									$scope.tr7 = true;
									$scope.tr8 = true;
									$scope.tr9 = false;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==9){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = true;
									$scope.tr4 = true;
									$scope.tr5 = true;
									$scope.tr6 = true;
									$scope.tr7 = true;
									$scope.tr8 = true;
									$scope.tr9 = true;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==10){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = true;
									$scope.tr4 = true;
									$scope.tr5 = true;
									$scope.tr6 = true;
									$scope.tr7 = true;
									$scope.tr8 = true;
									$scope.tr9 = true;
									$scope.tr10 = true;
									$scope.tr11 = false;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==11){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = true;
									$scope.tr4 = true;
									$scope.tr5 = true;
									$scope.tr6 = true;
									$scope.tr7 = true;
									$scope.tr8 = true;
									$scope.tr9 = true;
									$scope.tr10 = true;
									$scope.tr11 = true;
									$scope.tr12 = false;
								}else if(res.data.data.RETDATA.length==12){
									$scope.tr1 = true;
									$scope.tr2 = true;
									$scope.tr3 = true;
									$scope.tr4 = true;
									$scope.tr5 = true;
									$scope.tr6 = true;
									$scope.tr7 = true;
									$scope.tr8 = true;
									$scope.tr9 = true;
									$scope.tr10 = true;
									$scope.tr11 = true;
									$scope.tr12 = true;
								}
								h(); 
								if(res.data.msg==null){
								
								 	layer.msg("登陆失效请重新登陆");
									setTimeout(function () {
										window.top.location.href=res.data;
									}, 1500);
									return;
								 
							}else if(res.data.code==1){
									$scope.names="";
									$scope.selPage="";
									$scope.selectPage="";
									$scope.pages="";
									$scope.page="";
									$scope.pageList="";
									//layer.msg('提示：'+res.data.CW,{icon: 5});	
									layer.alert('提示：'+res.data.CW, {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
										
								     }});
								     $scope.tr1 = false;
									$scope.tr2 = false;
									$scope.tr3 = false;
									$scope.tr4 = false;
									$scope.tr5 = false;
									$scope.tr6 = false;
									$scope.tr7 = false;
									$scope.tr8 = false;
									$scope.tr9 = false;
									$scope.tr10 = false;
									$scope.tr11 = false;
									$scope.tr12 = false;
									return null;
								}  	
								a = res.data.CNT;
								feny($scope.data);
					});	
				});	
		</script>
		<script type="text/javascript" src="../../js/log.js"></script>
	<script type="text/javascript">
		function s(){     
        $("#mask").css("height",$(document).height());     
        $("#mask").css("width",$(document).width());     
        $("#mask").show();     
	    }  
	    //隐藏遮罩层  
	    function h(){     
	          
	        $("#mask").hide();     
	    }  
		$(function(){
			s();
			$.ajax({
				url : getPath()+'/wsyyt/jcjbqkcontroller/dy',
				method : 'post',
				dataType : 'JSON',
				success : function(result) {
					var data = result.data;//这边的data属性是object
					h();
					if(result.msg==null){
						layer.msg("登陆失效请重新登陆");
										setTimeout(function () {
											window.top.location.href=result.data;
										}, 1500);
										return;
					}else{
						$("#ZJHM").html(data.ZJHM);
						$("#XINGMING").html(data.XINGMING);
						$("#DWMC").html(data.DWMC);
						$("#DWZH").html(data.DWZH);
						$("#GRZH").html(data.GRZH);
						$("#DWJCBL").html(data.DWJCBL);
						$("#GRJCBL").html(data.GRJCBL);
						$("#GRJCJS").html(data.GRJCJS);
						$("#GRYJCE").html(data.GRYJCE);
						$("#JCZT").html(data.JCZT);
						$("#GRZHYE").html(data.GRZHYE);
						$("#KHRQ").html(data.KHRQ);
						$("#JZNY").html(data.JZNY);
						$("#XHTQJE").html(data.XHTQJE);
						$("#XHRQ").html(data.XHRQ);
						 var date=new Date();
								   var year=date.getFullYear(); //获取当前年份
								   var mon=date.getMonth()+1; //获取当前月份
								   var da=date.getDate(); //获取当前日
								   $("#dyrq").html("打印日期:"+year+"-"+mon+"-"+da);
					}
				},
			});
		});
		 function dyzm(obj) {
				var x = $(obj).parent().parent().find("td");  
				var y = x.eq(7).text();
				layer.open({
	            type: 2,
	            title: false,
	            closeBtn: 0, //不显示关闭按钮
	            shade: [0],
	            area: ['0px', '0px'],
	            offset: 'auto', //右下角弹出
	            time: 1, 
	            content: ['test/guodu.html', 'no'], //iframe的url，no代表不显示滚动条
	            end: function(){ //此处用于演示
		                layer.open({
		                    type: 2,
		                    title: '结清打印证明',
		                    shadeClose: true,
		                    shade: false,
		                    maxmin: true, //开启最大化最小化按钮
		                    area: ['100%', '100%'],
		                    content: getPath()+'/wsyyt/page/gjj/jcdyzm.html?id='+y
		                });
	            	}	
	        	});
		    };
	</script>
	<script>
	layui.use('laydate', function(){
	  var laydate = layui.laydate;
	  laydate.render({
	    elem: '#test8'
	    ,type: 'month'
	    ,range: true
	  });
	});
	</script>
	<script type="text/javascript" src="../../layui/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
// 判断pc浏览器是否缩放，若返回100则为默认无缩放，如果大于100则是放大，否则缩小
function detectZoom (){
  var ratio = 0,
    screen = window.screen,
    ua = navigator.userAgent.toLowerCase();
   
   if (window.devicePixelRatio !== undefined) {
      ratio = window.devicePixelRatio;
  }
  else if (~ua.indexOf('msie')) { 
    if (screen.deviceXDPI && screen.logicalXDPI) {
      ratio = screen.deviceXDPI / screen.logicalXDPI;
    }
  }
  else if (window.outerWidth !== undefined && window.innerWidth !== undefined) {
    ratio = window.outerWidth / window.innerWidth;
  }
     
   if (ratio){
    ratio = Math.round(ratio * 100);
  }
     
   return ratio;
};
//window.onresize 事件可用于检测页面是否触发了放大或缩小。

var firstOnResizeFire = true;//谷歌浏览器onresize事件会执行2次，这里加个标志位控制

 
$(function(){
  //alert(detectZoom())
})
$(window).on('resize',function(){
      isScale();
});
//判断PC端浏览器缩放比例不是100%时的情况
 function isScale(){
  var rate = detectZoom();
  if(rate != 100){
    //如何让页面的缩放比例自动为100,'transform':'scale(1,1)'没有用，又无法自动条用键盘事件，目前只能提示让用户如果想使用100%的比例手动去触发按ctrl+0
    console.log(1);
    layer.alert('提示：当前页面不是100%显示，请按键盘ctrl+0恢复显示标准，以防页面显示错乱！', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
										
								     }});
  }
} 
 
//阻止pc端浏览器缩放js代码
//由于浏览器菜单栏属于系统软件权限，没发控制，我们着手解决ctrl/cammond + +/- 或 Windows下ctrl + 滚轮 缩放页面的情况，只能通过js来控制了
 // jqeury version
$(document).ready(function () {
  // chrome 浏览器直接加上下面这个样式就行了，但是ff不识别
  $('body').css('zoom', 'reset');
  $(document).keydown(function (event) {
    //event.metaKey mac的command键
    if ((event.ctrlKey === true || event.metaKey === true)&& (event.which === 61 || event.which === 107 || event.which === 173 || event.which === 109 || event.which === 187  || event.which === 189)){
      event.preventDefault();
    }
  });
  $(window).bind('mousewheel DOMMouseScroll', function (event) {
    if (event.ctrlKey === true || event.metaKey) {
       event.preventDefault();
    }
  });
});
</script>
</body>
</html>